<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of ContactForm
 *
 * @author Jonnatan
 */
class PetForm extends BaseForm {

    public function configure() {
        $this->setWidgets(array(
            'origen' => new sfWidgetFormInputText(),
            'destino' => new sfWidgetFormInputText()
        ));

        $this->setValidators(array(
            'origen' => new sfValidatorString(array('required' => true, 'min_length' => 3), array('required' => 'Debe indicar el origen')),
            'destino' => new sfValidatorString(array('required' => false,'min_length' => 3))
        ));
        $this->widgetSchema->setNameFormat('peticion[%s]');
        $this->widgetSchema->setFormFormatterName('list');
    }

}
